<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
    </script>
</head>
<body>
<div class="dropdown-menu">
    <dl>
        {volist name="data" id="v"}
        {if condition=" $v.fid == 0 "}
        <dt class="{$v.pid} ">{$v.pname}</dt>
        {else/}
        <dd class="{$v.fid}">{$v.pname}</dd>
        {/if}
        {/volist}
    </dl>
</div>
<a href="/logout">登出</a>
</body>
</html>
<script>
    $("dt").on('click', function () {
        var id = $(this).prop('class');
        $("dd[class=" + id + "]").slideToggle('slow');
    })
</script>